package request

type AlibabaServicecenterWorkcardCancelRequest struct {
	/*
	   工单id     */
	WorkcardId *int64 `json:"workcard_id" required:"true" `
	/*
	   取消备注     */
	Memo *string `json:"memo,omitempty" required:"false" `
	/*
	   服务单id     */
	ServiceOrderId *int64 `json:"service_order_id,omitempty" required:"false" `
	/*
	   原因code     */
	ReasonCode *int64 `json:"reason_code,omitempty" required:"false" `
	/*
	   原因desc     */
	ReasonDesc *string `json:"reason_desc,omitempty" required:"false" `
	/*
	   请求来源类型 defalutValue��2    */
	Type *int64 `json:"type,omitempty" required:"false" `
	/*
	   真实服务商昵称     */
	RealTpNick *string `json:"real_tp_nick,omitempty" required:"false" `
}

func (s *AlibabaServicecenterWorkcardCancelRequest) SetWorkcardId(v int64) *AlibabaServicecenterWorkcardCancelRequest {
	s.WorkcardId = &v
	return s
}
func (s *AlibabaServicecenterWorkcardCancelRequest) SetMemo(v string) *AlibabaServicecenterWorkcardCancelRequest {
	s.Memo = &v
	return s
}
func (s *AlibabaServicecenterWorkcardCancelRequest) SetServiceOrderId(v int64) *AlibabaServicecenterWorkcardCancelRequest {
	s.ServiceOrderId = &v
	return s
}
func (s *AlibabaServicecenterWorkcardCancelRequest) SetReasonCode(v int64) *AlibabaServicecenterWorkcardCancelRequest {
	s.ReasonCode = &v
	return s
}
func (s *AlibabaServicecenterWorkcardCancelRequest) SetReasonDesc(v string) *AlibabaServicecenterWorkcardCancelRequest {
	s.ReasonDesc = &v
	return s
}
func (s *AlibabaServicecenterWorkcardCancelRequest) SetType(v int64) *AlibabaServicecenterWorkcardCancelRequest {
	s.Type = &v
	return s
}
func (s *AlibabaServicecenterWorkcardCancelRequest) SetRealTpNick(v string) *AlibabaServicecenterWorkcardCancelRequest {
	s.RealTpNick = &v
	return s
}

func (req *AlibabaServicecenterWorkcardCancelRequest) ToMap() map[string]interface{} {
	paramMap := make(map[string]interface{})
	if req.WorkcardId != nil {
		paramMap["workcard_id"] = *req.WorkcardId
	}
	if req.Memo != nil {
		paramMap["memo"] = *req.Memo
	}
	if req.ServiceOrderId != nil {
		paramMap["service_order_id"] = *req.ServiceOrderId
	}
	if req.ReasonCode != nil {
		paramMap["reason_code"] = *req.ReasonCode
	}
	if req.ReasonDesc != nil {
		paramMap["reason_desc"] = *req.ReasonDesc
	}
	if req.Type != nil {
		paramMap["type"] = *req.Type
	}
	if req.RealTpNick != nil {
		paramMap["real_tp_nick"] = *req.RealTpNick
	}
	return paramMap
}

func (req *AlibabaServicecenterWorkcardCancelRequest) ToFileMap() map[string]interface{} {
	fileMap := make(map[string]interface{})
	return fileMap
}
